/**
 * @param {number[]} guess
 * @param {number[]} answer
 * @return {number}
*/
var game = function(guess, answer) {
  let result = 0;
  for(let i = 0; i < guess.length; i++) {
    if(guess[i] == answer[i]) result++;
  }
  return result;
};
let guess = [1,2,3], answer = [1,2,3];
console.log(game(guess, answer));
guess = [2,2,3], answer = [3,2,1];
console.log(game(guess, answer));
